** Replication Data & Code for
* Title: "Democratic Ceilings: The Long Shadow of Nationalist Polarization in East Asia"
* Author: Aram Hur and Andrew Yeo
* Journal: Comparative Political Studies


* Set the working directory
cd ""

* Import the replication data
use "Replication_HurYeo.dta", replace


* Figure 2
cibar vote, over(treatment) barcolor(gs11 gs7 gs3) graphopts(graphregion(fcolor(white)) ytitle("") title("Vote for candidate", color(black)) ylabel(.2(.1).6) legend(rows(1)))
	graph save figure2_vote, replace

cibar favor_re, over(treatment) barcolor(gs11 gs7 gs3) graphopts(graphregion(fcolor(white)) ytitle("") title("Favorability of candidate", color(black)) ylabel(.4(.05).6) legend(rows(1)))
	graph save figure2_favor, replace
	
	grc1leg figure2_vote.gph figure2_favor.gph, graphregion(fcolor(white))
	graph save figure2, replace
	graph export figure2.png, replace


* Figure 3
cibar vote, over(ideo treatment) barcolor(gs11 gs7 gs3) graphopts(graphregion(fcolor(white)) ytitle("") title("Vote for candidate", color(black)) ylabel(.2(.2).8) legend(rows(1)))
	graph save figure3_vote, replace

cibar favor_re, over(ideo treatment) barcolor(gs11 gs7 gs3) graphopts(graphregion(fcolor(white)) ytitle("") title("Favorability of candidate", color(black)) ylabel(.4(.05).65) legend(rows(1)))
	graph save figure3_favor, replace
	
	grc1leg figure3_vote.gph figure3_favor.gph, graphregion(fcolor(white))
	graph save figure3, replace
	graph export figure3.png, replace


*************** End of Replication ***************
